import { ErrorBlock, Button, Space } from 'antd-mobile';
import React from 'react';
import { useHistory } from 'react-router-dom';

export default function NotFound() {
  const history = useHistory();
  return (
    <ErrorBlock fullPage title="您要访问的页面不见了" description="请换个页面上试试">
      <Space>
        <Button color="primary" onClick={() => history.push('/')}>
          返回首页
        </Button>
        <Button color="warning" onClick={() => history.goBack()}>
          后退
        </Button>
      </Space>
    </ErrorBlock>
  );
}
